bug fixes in object detection