Fix Unclosed Transaction Bug