fix to finding init state with the previous goal_id in searchForStates