Fix stylesheet calculations