Fixed issue where port was not getting sent to template.