fix javascript problem