fixing some minor flow issues with secure data.