Fixed setSync method