Merge "Fixed NPE when local or remote port range does not exist"