added fix for multiple instances