Fix incorrect server stop.