Closes #120. Fixes #122.