Synchonized the wait