Fixed several bugs for assigning dimension per line item