local-flags bug fixed