fix 'not a valid choice' error
use config.from_object to set config