refresh graphs properly