javascript error fix