fixed a callback bug