Issue #32: fixed template ordering