cleanup code to make less diff to non-nfc codina