Guarantee that the port mapping works for any template.