Better handling of connected status