JS undefined API dict keys fix