fixed a bug with NC