bug fix: memory leak