Hotfix/fix errors

Make things crash the right way