Changed extend lines and added resize code. This fixes some weirdness with resizing.