fix callback not initialized bug