Fix issues with resizing of selection