fixing cursor color change issue and pasting