fixes Issue #340
update tests, detect currentScript execution, compiled