Fix unnecessary code
Fixed problem with empty ScriptName and ExpandParams (#264)