closes #217 and #231