Fix: remove memory leak