Fix wrong edge orientation