Bug fix for disapearing chart data on page change