Fixed an error when Socket.io is not available