Fixing bounds calculation for label box