Fixed small issue with Main Frame, still working on undo.