update demo to work fully with current version, fix bug in build_local.