Fix preview generation in updateExercise()