Fixed a problem when the id given is wrong