fixing subgoals