fixed bug with bounding box