fix for the connect after authorize problem.