fix for working with arrays. They need to be added with an extra index