menubar: fix small mem leak
preferences: fix small mem leaks