fixed bug in bounding box