Fix my prev_page code, thanks to riking