fixed error when building with js