Bug fix; closes #1