improve config option parsing