Fix menu rebuild bug