fixed a bug in db require