fix for mongoid