fixed a bug for uses of classes like types