Fixed disconnect method not being able to handle null locations (e.g. moving entities).