Final fixes for database population