Updated to set/unset the value in ping & open