Fixed error for even n values