Hopefully fixes #222, closes #228