Fixed issue with infinite rotation