fix error with connection

Signed-off-by: Frederic Descamps <lefred.descamps@gmail.com>