1999 hyundai sonata gls v6

My cars runs rough at idle while in gear. It runs smooth when I put it in neutral or park. What should I check?