Re-merge #367