fix crashes when closing the app in filtering and registration WS.