Fix multi-instance bug
Merge pull request #155 from AlexanderDzhoganov/master

Fix multi-instance bug