fixed loading config file from context.
merge with upstream