Small fix in object detection method