fix js registration