updates to work with mongoid-3.x