Fixed usage of wrong padding for width calculation