Fixed map collision detection. It works now. I think.