Trying to fix DB transaction bug.