Only pad zeros when they are needed