fixed issue with null port in format