Fixed orientation functionality.