fixes and closes #239