small memory leak fixed