Find random flag correctly