fix: fixed some memory issues resulting from syscalls that dont return