[js] Fix dynamic rhythm correction