correct JS handlers