Fixed a few printing bugs