catch TypeError, not sure what is causing it. Extremely rare