fix HABTM association query