Fix config parsing, use proper type coercion funcs