fix invalid orientation support.