Ray rotating bugfix