Solved problem with copieing array. Thanks to @JeroenVisser101