Fix multiple instance bug