repair a fatal bug

prepare for dealing with chunk size