Fixed some bugs in the jsfl scripts.