flash.clear to gen template