fix caching of styles

If you choose to go with option 2 that I listed in #32, this is the PR.
L43 already sets str to args[0]. The index in this loop should start at `var a = 1`