added check for null unconnected