fix mongoid error