Fixed template path resolution problem