buggy "fix" for port caching, still working on it.