fixed callback bug