Fix unit tests after adding insecure flag