You should check if the cross here results in the zero vector which can happen near the south pole.