Rectangle rotation fix