fix n/r mixed bug