fix mongoid initialization issue