Fix bug with nstask