Fix for the animal-wall collision bug.