fixing clipboard function