fixed grid rotation so it retains its position when changing the number of columns