No longer crashes after switching modes, turns out I forgot to stop
the handler