Fixed handling of default DB