Fixed bug - not everyone uses DB 0. Use first available database as default for any invalid DB indexes