fixing problem with retrieving ObjectId upon insert