Fix NA string for CSV output
Fix public key extraction