multiple fixes for database routes