fixed mongoid error