Fixed RuntimeWarning that occured during some triangular rotations