Fixed rotation issue in Rectangle