fixed bugs with resizing regions