merged in upstream changes