fix: memory leaks