revert: Fix possbile memory leak