Fix inverted datatypes in ChunkIterator
Fix runtime issues on Solaris