fixed issue with multiple instances