Bug fix; closes #31