Fixed bug in pad calculation when setting the gauge parameters.