Fixed memory leak on early callbacks.