corrected N bug