Bugfix gallery edit pagination