Connection detection added
commit merge