Use a neutralizer on the carpet. Start at two or three ounces of white vinegar per quart of water.