fix invalid json, reorder some buttons