Error: Size of input array must be at least 2.