rectified error when nl=N. Pawan