Added callbacks for register