fixes association definition order bug