fix some association bugs