Fixed bug in overhanging ridge detection