fixed the resizing issue