Changed notifyAll to notify