Pass ObjectId parameters by ref (fix #12)