Green Poo

My baby keeps pooping green poop. I know that means I may have a imbalance of foremilk and hindmilk.. but is there a way to correct this or is it not a big deal? He's been gaining weight, he's not sick, he does have diaper rash and is a little fussy but I've cut out most dairy, I do smoke cigs once in awhile not too sure if that has anything to do with it 
Any advice ladies??