Fixed JS validation

Fixed JS validation