Fixed the bottom contact algorythm