Fixed crash when pasting clipboard