Fix js typing error