Fixes regression introduced in #1218.
Merge pull request #1281 from halfdan/regression

Fixes regression introduced in #1218.