fix association when using an array