Fixed new type() method