Merged from @cswiii PR.