bug fix on wscript