fixed a bug in boundingBox