fixed some bugs

fixed the resizing problem
fixed the container size problem