Fixed bug in detachServer where it was not flaging that it was no longer attached.