Catch atrributeError and fix it.