corrected bug in padTo