solved bug in detecting 'ns'