structure demo fix, type fixes