fix background rendering with padding