Fixed memory leak due to last commit.