Added auto database selector