Fixed only_update bug and contamination of flags dicts