Initial fix closes #166