added exception for no port