fix js generation