Correctly emit events when using db.db by reusing registered db's #1040
Emit error correctly across db's when error in client callback
Minor fix
Formatting fix