fix template exception and staff required