Fixed a subtle bug that should fix #66.