fixed template problem with local mode on