Merge with upstream, adapt mod