Fixed bug where only one in-var was written to the output string
* Fixed bug where read only vars were not treated as such