[BUG] Fixed memory leak