Fix undefined index warning messages; key new arrays properly