bug fix to Dtype generation