fix caching of styles

If you choose to go with option 2 that I listed in #32, this is the PR.
I've been told usage of `String()` is not adviced, as the type of the resulting object will be `[Object String]` rather than `string`.