Added error checking on reply