made some bug fixes

removed a stray p
Fixed another bug related to printing output
Fixed bugs related to printing port and ip