fixing $PORT mapping