First attempt at fixes for #67