Fixed templates to work with top level alias values