Fix problem with object detection.