Revert "Revert "Merge pull request #1674 from erikvold/1077372""

This reverts commit 28ed64dc372d666e0e1bd5fc959d23d44443203c.