bugfix in typecheck taret