Fixed segfault, host code is 100% functional.