improve clipboard handling