Fix bug that is caused by arbitrary-rotation transform