Updated from commit a178c44acb01df32204c9a77f476debdfa9c702f.