Made CDB work on 5.1
Merge pull request #8 from pamval/master

Made CDB work on 5.1