Fixed small bugs related to subsample processing