Upstream merge

ugh... this is an ugly one. :(