Handle up navigation properly.