Fixed js validation