Merge "Fix crash when docking." into nyc-dev