Fixed bug in KVProcess self.wait