Fix menu resource leak