I/O bug fixes

Import and export bug fixes, especially with null values