Changed the transition to edit mode so that it is able to work without displaying the preview mode and not lead to a crash
Merge pull request #19 from rlloyd2001/fixcrash

Changed the transition to edit mode so that it is able to work without d...