reset statement handle in loop