N computation bug fixed