Make configureJuju more robust