in reply to Re^2: flag functionin thread flag function
That wasn't quite the problem, but it's been fixed. Thanks.