Synchronization error, with threads - C#