Remerge of #919