Fix apps dependencies (#508)
Fix menu: only add state links when state app is installed.