fix broken js syntax