fixes issue #387 -- printing on every iteration in every block