ParseInt on client and disconnect bug fixed

Added type and parseInt to client, improved disconnect on server.