fix crash in clear pending transactions