Fixed some jsscript errors and warnings