fixed a bug in linq file generation