fixes a crash when using the clipboard