Fixed bug where pressing Stop Editing while not editing causes errors