Bugfix in DESTROY subroutine.
Only call disconnect subroutine if still connected.