Added nessicary synchronization.