fix rotate horizontal and vertical