fixed server main
Merge branch 'master' of git://github.com/emmmile/rotdist into server
Merge branch 'master' of git://github.com/emmmile/rotdist into server
modified script
added mutexes in main