Resolve the right database connection.
Merge pull request #4362 from 4dma/fix_resolve_connection

Resolve the right database connection.