make mapper be consistent when setting flags in code