Cleaned up memory leak