Fix issue #6

Fix flipping to editor mode.