fix for non-double json encoding