hotfix catching TypeError