Dodge KeyError on pop