Fixed a race condition when Server.Stop() is called before Server.Wait(). Thanks to http://blog.golang.org/race-detector