Fix for finding closest Edge