Fixes #164, closes #165.