KeyError on missing applications key