Fixed a typo causing problems when writing image hdf5 files.