Fix for detecting the bottom