[R2D] Fixed padding not being computed properly