Fixed js cycle