fixed bug where rotation work was not idempotent