fixed a bug in association