fix insecure mode