double onSleep fix
Merge pull request #155 from nizsheanez/connection_fix

double onSleep fix