hotfix to error handling