fix enabling the secure mode