Fixed the errors going to pages and added functionality to stop editing