Fixed bug in ObjectId creation