avoid separator at the beginning of the menu

starting with the check variable as true, if the first element of the menu has the separator_before set, it will skip it