[#207]Make the templates work correctly for multiple store