Added 404 error if ID is not found.