Fix error with joinfields

fix error when labeling joinfields or make thematic maps with spatialite files