Corrected selection resizing. Also, implemented line resizing.