Fixed some bugs with planner. Working on two other bugs