fix mongoid definition