fix transaction problems