fix reading ndef