Hotfix for new API and error not being re-thrown
Fix for potential segfault