fixed addtype method in class Scope