prevent crash when pasting nothing