Fix mod menu memory leak