Fix border-box layout issues