correction js flat bet