fix mongoid bug