closes #223
fixes #221
fixes #220