Rebase from 'upstream' @ version '0.5.0'