Logic error. Closes #91