small fix for memory leak