Further fixes to the padding issues