fixed a bug which caused improper scrolling of subgoal viewer