fixed resizing issues on different devices