fixed problem with distorted edges