Fix JS validation errors