Syncronization test using Threads/Mutex/NCurses and small fix in threads