Fixed the marking of unproper edges