Fixed bug printf overflowing output