forgot to add if connected
Merge pull request #2 from Senorihl/master

forgot to add if connected