Improved stability of template import process.