allowed_ports template fix on empty allowed port list