Fix input array with spaces