Fixes in exporting, JSON parsing, and '-a'