Fixed a server crash and added send functionality.