Small bug fix to resizing event.