Applied mongoid 3.0+ compatability