Fixed up a bug with resizing