Fixed N times bug