Make sure flags are set appropriately.