fix call twice bug