Linux fixes + js api fixes