fix loop tests