fixed lcoal var access for mongo table