Fixed bug in server - now everything works