Fixed problem with device resetting connection