fxing issue with template error when menu does not exist
pep8