Fix secure mode reset