Fix exiting draw mode via other means (fixes #503)