Updated javascript error