handle next_url edge case