move to connect to resume
fix NPE