slightly safened the JS