Adding exception if "pid" and "id" are given