fixed getting ports