math fix and box-shadow adjust