Fix model saving bug, which prevents other pages than page 1 from saving
Bugfixing and Refactoring