fix caching of styles

If you choose to go with option 2 that I listed in #32, this is the PR.
Do you have a specific example? I've found using String (without new) to be the best way to convert to a string.