Fixed the auto menu logic. Issue appeared when there is no permissons assigned.