fix bug for structural learning