Fixed getVariable issue that would fail when getting matrix expressions.