Clipboard support(thx to zhyk). some bug fix.