fixed some errors in the database