Before fixing, check my big comment regarding this bounding box computation. Maybe you will fix it with that comment.