mongoid 3
some fixes