fixed bug with padding