Flag problem solved