Off course the add_loop_cnt variable should not be declared static as I mentioned in the initial bug report. It should just be moved up to teh beginning of the function because we do want it to be initialised to 0 for every call of the function. /Herman