Fixed the infinite loop, but collision is still a little wonky.