Fixed printing to stdout