proper clipboard handling