fixed seg fault when not checking success of a reply