Correct DBInfo queries

Cleanup code