fix generationg associative table data