Minor edge detection improvement