fixed js multiple event submission