notifyAll() replaced with notify().