minor changes to get template preview api