Catch an indexerror rather than all errors