add head protect macro