Fix multiple instances bug