Fix exceptions when an entry with an id that doesn't exist is searched for