fixed printing to the screen