fix n plus one error
Merge branch 'fix_n_error'