Added template correction