Fixed an issue with timeout and web sockets