fixed json error printing