fix broken JS init