Don't go through the immigration counter. At the end of the immigration counters, off to the side, there is another line for transit passengers. Get on that transit passenger line and get a stamp on your onward boarding pass from one or two on-duty agents then you are off to downstairs for the security line to get back to the air side for your connecting flight.