fixed formatting where inner elements would extend past outer elements