Fixed bug with parsing variables from string