Fixed memory leak when switching menus
Fixed memory leak when switching menus