fix for DB connection switch when doing status request, fix for tables case-sensitvity, added logging