Fix error and commit database