fix javascript client