fixed flag code