fix bug: BSON undefined