Ensure that prepareSecure is called before secure