fix history and presence base state json encoding