Fix bug in print method (2)