Added connectivity check + fixes.