Catch IndexError explicitly

bare excepts are bad