Fix out of bound - rotate