Revert "added cleanup call"

This reverts commit 6dac3bf9747e99618c0b57930cb3f61cff21fe5d.

This commit results in segfault.