fix js_flash not closing bug