fixed bug in ncl computation