Added support for screen size changes