Fix errors to make JSON valid