Fixed flow and token storage issues.