fix preloading templates when using modules structure