fixing mongoid issue