Fix condition checking in doPaste.