fixes the error when typesig is added after class method is defined