fixed typo in db factory