fixed most loops in 9.3