fix NCA code