fix database error and update it