Made some quick fixes to jslib.