fix bug with rotation