Re-ordered 'synchronized' statements- prevent further race condition
Merge pull request #27 from kaltura/3.0.8.6

Re-ordered 'synchronized' statements- prevent further race condition