fix effects crash and add test that would have caught it. closes #87