Fixed bug with updating of associations