fix javascript extend error