fix primitiveForType