Changed syncronisation for more performance.