Add extra error handling for non-existant index