add support for error reply; fix get/set bug.