Fix: backrotation produces exception (invalid mod operation)