Fix for mongoid 4