Added better collision detection while moving