fix for storing ObjectId "foreign keys"