Fixed bugs with selecting/resizing regions