javascript test error fix