fix the print command function