Bug fix; closes #52