Fix buggy rotate functions