Fixed issue with last_page