Fix issue #6

... and also make build somewhat more robust ;-)