Solving the bug with the js order