handle mongoid ids correctly