Minor cleaning
Added an error handling for missing index errors that return an empty array