fix double callback bug