Fix allocation of port numbers for JVM