Take padding into account.
Fix number of steps.