bug fixes on set_planning_env()