Fixed a crash introduced in pull request #1449.