Distfixes

Fixes for issue #333