Fixed other undefined errors due to missing checks

Signed-off-by: emanuele <emanuele45@gmail.com>
Merge pull request #700 from emanuele45/fix_menu_2

Fixed other undefined errors due to missing checks