try to fix the ws auto-closed problem