Fix a bug. Closes #144.