more mongoid fixes for non mongoid environments