Fix period error - only 10 periods. So don't try to access int[11].