to make it more compatible with chrome app sockets