Fix bug

This closes #1