Added orientation check on resize