Minor bug fix in ServerThread