fixed the bug where the viewport doesn't reset correctly when you hit a spike