Merge "Fix null pointer exception when set preferred transport" into main