fix sementation fault in menu