fix resizing problem