Fix port fetching from env