fixed loading template dependencies