Fix menu crash on Mac