Fix *config functions to support manally export env vars and fix wrong wrong word "vaild"