Fix issue with multiple instances 

Fixes #22