fixing cut/paste bugs