Fix JS bug in PlanExercise precondition