fixing part of #247 ,thx to tropicdome &jsmb768ypl
fixing #247 & part of #253
new revision for better&faster support
Merge remote-tracking branch 'upstream/master'
Fixed local function scopes