Fixes bug in PagesAJAXController when ordering pages.