fix rotation of cubes; fix angles mixing between 0 and 270