replace multiple commit callback with two callbacks for compatibility