only set @template from options when it exists
add test for default template. fixes template bugs