diff --git a/src/gui/properties/pieceavailabilitybar.cpp b/src/gui/properties/pieceavailabilitybar.cpp
index ac746f1..490d380 100644
--- a/src/gui/properties/pieceavailabilitybar.cpp
+++ b/src/gui/properties/pieceavailabilitybar.cpp
@@ -179,7 +179,8 @@ void PieceAvailabilityBar::updateImage()
   for (unsigned int x = 0; x < scaled_pieces.size(); ++x)
   {
     float pieces2_val = scaled_pieces.at(x);
-    image2.setPixel(x, 0, piece_colors[pieces2_val * 255]);
+    int really_unique_var = piece_colors[pieces2_val * 255];
+    image2.setPixel(x, 0, really_unique_var);
   }
   image = image2;
 }
