fix ncc bugs