Added compatibility with Melamid's new database wrapper.