Fixed bug with data refreshing.