fixing bugs of print a