added a loading image in class select histogram
making sure the loading image closes even in cases of error in class select histogram