bug fixes while integrating with brackets native copy-paste handling