prevent never ending loops in preference form