Sync with upstream 0.4.5