Tries to fix mongoid error