fix resizing problems