fixing process-ports script for mac