upgrade would delete all templates for non-transfers
fix NPE