undefined callback fix