Multi threaded server

Tried to implement, weird bug appearing