more reliable screen size detection