better handle paste event