js validate fixes