small fix to loop section