Update: reposition 404 abort function (should be before pagination variables).