fix crash on cancel
fix merge