fix mongoid 4 compatability