fix paste from global buffer