Fix the key error and occasional 429 failure