Fix for wrong edges