There is probably a smarter or more elegant way to do this, but this works.
Fixes #553
This is an alternative to !931