Update to upstream code