fix undefined callbacks