[NSM] fix pr #226. Not full