Merged from upstream v0.4.1