Fixed bug where multiple variables weren't processed