fixed flag script