updated to use vhost_type rather than just plain type to avoid conflict