Final fixes of auto configuration stuff

. fixes #3
. fixes #5