Fix big problem that only first irep will be printed