fixes a menu generation problem