Fix invalid characters