Fixed small bug in ServerThread