added auto-docking cancel code