Finally got it working yo. This is a minor memory segfault cleanup