Change to NotFoundException
Fix comparison which was not correct earlier