corrected errors on add_port function