fixes for database compile