Solve bug for new database