fixed JavaScript