Fix padding in various scenarios