Tests and fixes for custom readers/writers