fix clipboard function