merged in upstream 0.8