Added an output buffer, to ensure content shows up at correct place.