Fixed a bug
Fixes #45.