1999 sportsman 500 carb issues

Hello, i’m new here and have a problem with my atv. Removed the carb cleaned it over night, changed the needle and seat. reinstalled the engine idle was low about to stall out so increased idle after a while the idle becomes way to high so i lower it down then it runs good for a while but soon becomes to low. While this is happening I was riding around and I get alot of popping or back firing through the carb. Not sure what the problem is any help would be great thanks Mike.