Updated for height to be displayed into the shape, so that there is no bounds problem when the shape is too close from the border