Fixed some bugs in the planning view.