fix bug in menu label construction

closes PR 13817