correct conversion of NULL form 0 to NA