fixes the cancel behavour when using the c shortcut