fix resizing issues