fixed nm function plugin