Fixes a bug when the label width and height are not specified