fix bug in Dtype generation, also bug in eq type