Fix secure detection