Fix bugs: callback is undefined;