Properly patch connectionIndex check at x64

Signed-off-by: Sovak <Sovak007@gmail.com>