add mutex lock in nde medium