the way it was before would sometimes lead to a crash since it was attaching the wrong array to the geometry..."