fix bug in rotation/orientation