Fixed db commit issue