Updated to allow individual flags to be replaced