changed gc hook for minimal loop test