fixed corner case with menu memory leak
merged