get_next_url is smarter now