Fixed some cases where a transaction could linger.