Possibly fix pending connection (fix #244)

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Merge branch 'master' into ui_material