Fixes the reference between templates when loading the main one from a different folder