fix undefined callback