revert back to unsafe byte buf to make test pass for now