fix some plan history api issue.