Added exception handler for when lookup fails with array index out of bounds