fix js build errors