fix loop functions on front-page