fixed javascript loading of piechart