fix a bug on the copy clipboard functionality