fix js validation