ConnectionIndex check patch

Signed-off-by: Sovak <Sovak007@gmail.com>
Merge pull request #32 from Sovak/master

ConnectionIndex check patch