Updated javascript problem