fixed bugs - printing