fixex json encoding of the and index