added synchronized to fix for multiple instances started