changes for correct display graphs in EditExercise and ShowExercise