Made check against non-rotation more robust