Fixed some issues with cancelling