Fixed padding code for additional axes