Fixed the printing bug. Other bugs were found: