(Minor) Amendment to ledge detection.