fix mongoid source issue
fix typo in test files