fix resizing issue