Fix column name and deal with "$" in label names.