fix loop isse