Found a problem in resize. It wouldnt paste the selection, and bring back the canvas from which the selection never left. Also, I just realized a better way to do with selectionTransparency stuff.