adding logic to select the first available challenge if the default challenge is not available. fixes #290